# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-cmaes
_pkgorig=cmaes
pkgver=0.10.0
pkgrel=1
pkgdesc="Python library for CMA Evolution Strategy"
url="https://github.com/CyberAgentAILab/cmaes"
arch="noarch"
license="MIT"
depends="
	python3
	py3-numpy
	py3-scipy
	"
checkdepends="
	python3-dev
	py3-hypothesis
	py3-pytest
	py3-pytest-cov
	"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
subpackages="$pkgname-pyc"
source="https://github.com/CyberAgentAILab/cmaes/archive/v$pkgver/$_pkgorig-$pkgver.tar.gz"
builddir="$srcdir/cmaes-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m pytest -k 'not test_fuzzing'
}

package() {
	python3 -m installer --destdir="$pkgdir" .dist/*.whl
}

sha512sums="
bec4884f4826c5e055a67c13839ca790dc1d150c66bc9f70b4cbfc836fdc40e9586f6f2d25c5e2041bd72c18659d41df6295bad7e0b7de963fc22c17ee2a7b4e  cmaes-0.10.0.tar.gz
"
